Pick’n’Fix Capturing Control Flow in Modular Compilers
نویسندگان
چکیده
We present a modular framework for implementing languages with effects and control structures such as loops and conditionals. This framework enables modular definitions of both syntax and semantics as well as modular implementations of compilers and virtual machines. In order to compile control structures, in particular cyclic ones, we employ Oliveira and Cook’s purely functional representation of graphs. Moreover, to separate control flow features semantically from other language features, we represent source languages using Johann and Ghani’s encoding of generalised algebraic datatypes as fixpoints of higher-order functors. We demonstrate the usage of our modular compiler framework with an extended running example and highlight the extensibility of our modular compiler implementations.
منابع مشابه
Compilation as Metacomputation: Binding Time Separation in Modular Compilers (ex Tende D Abstract)
This paper presents a modular and extensible style of language speciication based on meta-computations. This style uses two monads to factor the static and dynamic parts of the speci-cation, thereby staging the speciication and achieving strong binding-time separation. Because metacomputations are deened in terms of monads, they can be constructed modularly and ex-tensibly using monad transform...
متن کاملModular Program Transformations for Aspect-Oriented Constructs
This work describes a language design experiment in the context of aspect-oriented programming. The core idea was to develop a transformation from high-level language as expressive as AspectJ to a low-level language model, one construct at a time. The key requirement was for these transformations to be modular. The lowlevel language used was a simple aspect language model, named Nu that is base...
متن کاملDeveloping a Shock-Capturing Formulation with Higher Performance to Capture Normal Standing Shock in All-Speed Regime
The main objective of the present study is to utilize a novel linearization strategy to linearize the convection terms of the quasi-one-dimensional Euler governing equations on collocated grids and to examine its shock-capturing capabilities. To avoid a pressure checkerboard problem on the collocated grids, it is necessary to utilize two velocity definitions at each cell face. Similarly, we def...
متن کاملModular Control-Flow Analysis with Rank 2 Intersection Types
The performance of optimising compilers crucially depends on the availability of controlflow information at compile time. For any first-order imperative program, such information is available via a flowchart constructed from the program text. Consequently, traditional dataflow analyses can be used to perform a series of compile-time program optimisations (Aho et al. 1986). For higher-order prog...
متن کاملGoal Programming Approach to the Bi-Objective Competitive Flow-Capturing Location-Allocation Problem
Majority of models in location literature are based on assumptions such as point demand, absence of competitors, as well as monopoly in location, products, and services. However in real-world applications, these assumptions are not well-matched with reality. In this study, a new mixed integer nonlinear programming model based on weighted goal programming approach is proposed to maximize the c...
متن کامل